﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XProject.DataVisit.Model.Role;
using NHibernate;
using NHibernate.Criterion;

namespace XProject.DataVisit.DAL.BaseManager
{
    public class DAccess:AbstractSupportDal<GYAccess>
    {
        public IList<GYAccess> GetRoleList(Guid id)
        {
            IList<GYAccess> t = new List<GYAccess>();
            Template.Execute(delegate(ISession session)
            {
                t = session.CreateCriteria<GYAccess>()
                    .Add(Expression.Eq("RoleID", id))
                    .List<GYAccess>();
                return t;
            });
            return t;
        }
    }
}
